package com.zy.business.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zy.common.annotation.Dict;
import com.zy.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Description:项目实体类
 * @Author zhangxiaojia
 * @Date 2020/3/27
 */
@Data
@TableName("tb_project")
public class TbProject extends BaseEntity {

    /**
     * 主键
     */
    @TableId(value = "PROJECT_ID")
    private Long projectId;
    /**
     * 项目名称
     */
    @TableField("NAME")
    @ApiModelProperty(value = "项目名称")
    private String name;
    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间")
    @TableField(value = "START_DATE")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    private Date startDate;
    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间")
    @TableField(value = "END_DATE")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    private Date endDate;
    /**
     * 项目人员ids（用逗号分隔）
     */
    @ApiModelProperty(value = "项目成员")
    @TableField(value = "PERSON_IDS")
    private String personIds;
    /**
     * 项目人员list
     */
    @TableField(exist = false)
    private String personNames;
    /**
     * 项目负责人Id
     */
    @ApiModelProperty(value = "项目负责人")
    @TableField(value = "PRINCIPAL_ID")
    private Long principalId;
    /**
     * 项目负责人名称
     */
    @TableField(exist = false)
    private String principalName;
    /**
     * 项目状态
     */
    @ApiModelProperty(value = "项目状态")
    @TableField(value = "STATUS")
    @Dict(dictDataSource = "project_status")
    private String status;
    /**
     * 项目描述
     */
    @ApiModelProperty(value = "项目描述")
    @TableField(value = "DESCRIPTION")
    private String description;
    /**
     * 进度
     */
    @TableField("progress_rate")
    @ApiModelProperty(hidden = true)
    private Integer progressRate;
    /**
     * 项目类型
     */
    @ApiModelProperty(value = "项目类型")
    @TableField("type")
    @Dict(dictDataSource = "project_type")
    private String type;
    /**
     * 预算
     */
    @ApiModelProperty(value = "项目预算")
    @TableField("budget")
    private Double budget;
    /**
     * 来源
     */
    @ApiModelProperty(value = "项目来源")
    @TableField("source")
    @Dict(dictDataSource = "project_source")
    private String source;
    /**
     * 地址
     */
    @ApiModelProperty(value = "项目地址")
    @TableField("address")
    private String address;
    /**
     * 删除标志
     */
    @TableLogic
    private String delFlag;

    @TableField(exist = false)
    private List<TbProjectContact> projectContactList;

}
